function pop = DetermineDomination(pop)
% Function: pop = DetermineDomination(pop)
%
% Description: 计算个体之间的支配关系，若被其他个体支配，将 IsDominated 设置为 true
%
%
% Syntax:
%   
%
% Parameters:
%   pop：种群
%
% Return:
%   pop：进行非支配标记后的种群
%
%                  Young99
%         Revision:1.0     Data: 2022-12-07
%*************************************************************************

    nPop = numel(pop);
    
    % 初始化每个个体均为非支配个体
    for i = 1:nPop
        pop(i).IsDominated = false;
    end
    
    % 两两个体比较
    for i = 1:nPop-1
        for j = i+1:nPop
            
            if Dominates(pop(i), pop(j))
               pop(j).IsDominated = true;
            end
            
            if Dominates(pop(j), pop(i))
               pop(i).IsDominated = true;
            end
            
        end
    end

end